package com.cartel.genius.dao;

import java.util.List;

import com.cartel.genius.dao.exceptions.CategoryNotFoundException;
import com.cartel.genius.dao.exceptions.PlaceExistsException;
import com.cartel.genius.dao.exceptions.PlaceNotFoundException;
import com.cartel.genius.dao.exceptions.PlaceParentNotFoundException;
import com.cartel.genius.dto.CategoryTO;
import com.cartel.genius.dto.PlaceTO;


/**
 * DAO class for Place operations
 * 
 * @author Naresh Reddy
 */
public interface PlaceDAO {
	
	public PlaceTO addRootPlace(PlaceTO rootPlace) throws PlaceExistsException, CategoryNotFoundException;
	
	public PlaceTO addPlace(PlaceTO place) throws PlaceExistsException, PlaceParentNotFoundException, CategoryNotFoundException;
	
	public List<PlaceTO> addPlaces(List<PlaceTO> places, PlaceTO root) throws PlaceParentNotFoundException, CategoryNotFoundException;
	
	public PlaceTO modifyPlace(PlaceTO oldPlace, PlaceTO newPlace) throws PlaceExistsException, PlaceNotFoundException, CategoryNotFoundException;
	
	public PlaceTO modifyPlaceParent(int placeId, int parentPlaceId) throws PlaceNotFoundException;
	
	public PlaceTO modifyPlaceParent(PlaceTO childPlace, PlaceTO parentPlace) throws PlaceNotFoundException;
	
	public void removePlace(int placeId) throws PlaceNotFoundException;
	
	public void removePlace(PlaceTO place) throws PlaceNotFoundException;
	
	public List<PlaceTO> getPlaces(PlaceTO placeTO, CategoryTO catgoryTO) throws PlaceNotFoundException, CategoryNotFoundException;

}
